package com.sy.controller;

import com.sy.bean.pucharse.Condition.ShipmentQueryCondition;
import com.sy.bean.pucharse.ShipmentQuery;
import com.sy.common.bean.PageBean;
import com.sy.common.bean.ResultBean;
import com.sy.common.controller.BaseController;
import com.sy.common.utils.BeanOfMap;
import com.sy.service.ShipmentService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/api")
@Api(tags = "出货")
public class ShipmentController extends BaseController {
@Autowired
    ShipmentService shipmentService;
    @ApiOperation("出货列表")
    @PostMapping("/shipment/list")
    public ResultBean<ShipmentQuery> purQuery(@RequestBody ShipmentQueryCondition condition) {
        PageBean pageBean = shipmentService.query(BeanOfMap.bom(condition));
        return success("出货列表", pageBean);
    }
}
